
{// 引入标签库 }
<tagLib name="html" />
{// 加载头部公共文件 }
<include file="Public:headerNew" />

<load href="__PUBLIC__/Js/jqueryUI/jquery-ui-1.8.16.custom.min.js" />
<load href="__PUBLIC__/Css/jqueryUI/jquery-ui-1.8.21.custom.css" />

<!-- 菜单区域  -->

<!-- 导航条开始  -->
<div class="titleone">

<div class="fLeft titlenav" id="ctl00" style=" cursor:pointer;"><div class="bg-img fLeft" style="margin-top:2px;margin-right:8px;"></div><h1>抄表数据更新</h1></div>
<script type="text/javascript"> 
 $(function(){
	 $("#ctl00").click(function(){
	 if ($("#Slyout").css("display")!="none"){
			  $("#Slyout").slideUp(500);
	  		$("#Slyout_content").css("display","none");
		}


	  $("#Flyout").slideToggle(600);
	  $("#Flyout_content").slideToggle(600);
	  
	 });
	 $("#ct200").click(function(){
	  if ($("#Flyout").css("display")!="none"){
			  $("#Flyout").slideUp(500);
	  		$("#Flyout_content").css("display","none");
		}

	  $("#Slyout").slideToggle(600);
	  $("#Slyout_content").slideToggle(600);
	  
	 });

				
	//打印开始

	// Dialog			
	$('#dialog').dialog({
					autoOpen: false,
					width: 400,
	
					modal: true,
					buttons: {
						" 取  消 ": function() { 
								rowid=$("#rowid").val();
								$(this).dialog("close");
								$("#background",window.parent.parent.document).hide(); 
								printcount();
								$("#printframe").attr("src","about:blank");
								
						} ,
						" 再次打印 ": function() { 
								$(this).dialog("close"); 
								print_f($("#bizid").val(),$("#mons").val(),$("#rowid").val(),$("#meterid").val());
								//$(this).dialog("close"); 
						} 
						
					}
				});
	$('a.ui-dialog-titlebar-close').hide();  
	$("#printframe").load(function(){ 
	
        if ($("#printframe").attr("src")!="about:blank"){ 

	 		$("#background",window.parent.parent.document).hide();
			$("#succmsg",window.parent.parent.document).fadeOut(600,function(){ $('#dialog').dialog('open');}); 
			
	
		}
    }); 
 });
  function   addmeterItem(e,id)   
  {   
	var e = e || event;
	var   oObj   =   e.srcElement   ||   e.target;  
	  //if(oObj.tagName.toLowerCase()   ==   "td")   
	 // {   
		  	  /*
	  var   oTable   =   oObj.parentNode.parentNode;   
	  for(var   i=1;   i<oTable.rows.length;   i++)   
	  {   
	  oTable.rows[i].className   =   "out";   
	  oTable.rows[i].tag   =   false;   
	  }   */
	var obj= document.getElementById('checkList').getElementsByTagName("input");
	  var   oTr   =   oObj.parentNode; 
	  var row = oObj.parentElement.rowIndex-1;
	  if (oTr.className == 'down')
	  {
		  	oTr.className   =   'out';   
			
		    oTr.tag   =   true;  
	  }else {
			oTr.className   =   'down';   
			
		    oTr.tag   =   true;  
	  }
 	  //}   
	  self.location = URL+"/addMeterItem/id/"+id;
  } 
function print_f(id,mond,rowid,meterid){
		//$("#background",window.parent.parent.document).show();
		$("#succmsg",window.parent.parent.document).html('开始打印报表').fadeIn(600); 
		$("#rowid").val(rowid);
		$("#bizid").val(id);     
		$("#mons").val(mond); 
		$("#meterid").val(meterid);  
		$("#printframe").attr("src",'__URL__/printPost/id/'+id+'/monid/'+mond);			
		printframe.location='__URL__/printPost/id/'+id+'/monid/'+mond;
	    return false;

		
} 
function  editmeterItem(id){
 
		self.location='__URL__/editMeterItem/id/'+id;

		
} 
function printcount(){
var t_url=URL+"/printcount/bid/"+$("#bizid").val()+'/meterid/'+$("#meterid").val();

				$.ajax({
						url: t_url,
						type: 'GET',
						dataType: 'json',
						error: function(){
							alert('Error loading XML document');
						},
						success: function(data, textStatus){
							var json = eval(data['data']);
							if (json!=null){
								$("#td_"+rowid+"_11").html((Number($("#td_"+rowid+"_11").html())+1));	
					
						
							}
						}
				});
}
function getList(){
	 self.location = URL+"comlist/zoneid/"+$("#zoneid").val()+"/monid/"+$("#monselect").val();	
}

</script>
<!-- 查询区域 -->
<div id="dialog" title="打印确认">
<input type='hidden' id='rowid' name='rowid' value="0" />
<input type='hidden' id='bizid' name='bizid' value="0" />
<input type='hidden' id='mons' name='mons' value="0" />
<input type='hidden' id='meterid' name='mons' value="0" />
	<p>是否需要再次打印？</p>
</div>
<form method=post id="frmsearch" action="__URL__/index">
<div class="search">

<div class="searchbg fRig" id="searchbg">
<div class="fLeft"><span id="key"><input type="text" title="名称查询" name="name"  id="topsearch" value="请输入商户名或者编码" /></span><div class="imgsub" onclick="$('#frmsearch').submit();"></div></div>
<div id="ct200" class="bg-img Fright" style="margin-top:2px;margin-left:236px;cursor:pointer;"></div>
</div>

</div>
<!-- 小区列表开始 -->
<div id="Flyout" class="hpHdr_Flyout" style="left:0px;height:100px;">
</div>
<div id="Flyout_content" class="hpHdr_Flyout_content" style="left:0px;height:100px;">
<div>
<h1 style="font-size:18px;">分类查询</h1>
区域<select name="zoneid" id="zoneid">
<option value="0">选择区域</option>
<volist name="zones" id="vo">
<option value="{$vo.id}" <eq name="$vo.id" value="$zoneid">selected="selected"</eq>
>{$vo.name}</option>
</volist>
</select>&nbsp;&nbsp;
月份<select name="monselect" id="monselect">
<option value="0">选择月份</option>
<volist name="listMon" id="vo">
<eq name="$vo.id" value="$monid">
<option value="{$vo.id}" selected="selected">{$vo.name}</option>
<else/>
<option value="{$vo.id}" >{$vo.name}</option>
</eq>
</volist>
</select>
<span class="signup-button">
<a id="link-signup" class="g-button g-button-red" href="javascript:void(0);" onclick="$('#frmsearch').submit();"> 搜索 </a>
</span>

</div>
</div>
<!-- 小区列表结束 -->
<div id="Slyout" class="hpHdr_Flyout" style="left:0px;height:100px;">
</div>
<div id="Slyout_content" class="hpHdr_Flyout_content" style="left:0px;height:100px;">
<div>
<h1 style="font-size:18px;">高级搜索</h1>
<p>
<select name="zlist" style="height:28px; margin-top:2px;">

  <option value="0">选择区域</option>
<volist name="zones" id="vo">
  <option value="{$vo.id}">{$vo.name}</option>
</volist>
</select>&nbsp;&nbsp;月份：
<select name="monData" id="monData">
</select>
电话：<input name="tel" type="text" />&nbsp;&nbsp;联系人：<input name="contact" type="text" /><span class="signup-button">
<a id="link-signup" class="g-button g-button-red" href="javascript:void(0);" onclick="$('#frmsearch').submit();"> 搜索 </a>
</span>
</p>
</div>
</div>
<a href="__URL__"><div class="returnimg"></div></a>

</form></div> 
<!--导航条结束 -->
<!-- 主页面开始 -->

<div id="main" class="main full" >
<!-- 主体内容  -->


<h1 class="title"><span class="text" id="test">{$zonename}</span></h1><div class="mondis" style="float:right;margin-top:-30px;">{$year}年{$mon}月<input type='hidden' id='year' name='year' value="{$year}" /><input type='hidden' id='mon' name='mon' value="{$mon}" /></div>
<!-- 列表显示区域  -->
<div class="list" >
<table id="checkList" class="list" cellpadding=0 cellspacing=0 ><tr class="row" ><th width="8%"><a href="javascript:sortBy('id','','comlist')" title="按照编号 ">编号</a></th><th>商户名</th><th>联系人</th><th>电话</th><th>总水量</th><th>水费</th><th>总电量</th><th>电费</th><th>污水处理费</th><th>最后月份数据</th><th>状态</th><th>通知单</th><th>操作</th></tr>
<volist name="list" id="vo">
<tr class="row" onmouseover="over(event)" onmouseout="out(event)" style="cursor:pointer;"><td>{$i}</td><td><empty name="vo.meterMon"><a href="javascript:void(0)" onclick="addmeterItem(event,{$vo.id})"><else /> <a href="javascript:void(0)" onclick="editmeterItem({$vo.meterid})"></empty>{$vo.name}</a><input type="hidden" name="key"	value="{$vo.id}"></td><td>{$vo.contact}</td><td>{$vo.tel}</td><td>{$vo.awnum}</td><td>{$vo.wnum1}</td><td>{$vo.aenum}</td><td>{$vo.enum1}</td><td>{$vo.wwnum}</td><td>
<notempty name="vo.meterMon">{$vo.meterMon}</notempty>

</td><td>{$vo.status|getStatus}</td><td id="td_{$i}_11">{$vo.printflag}</td><td><notempty name="vo.meterMon"><a href="javascript:void(0)" onclick="print_f({$vo.id},{$vo.meterMon},{$i},{$vo.meterid})">打印</a></notempty></td></tr>
</volist>
</table>




<!--  分页显示区域 -->
<div class="page">{$page}</div>
<!-- 列表显示区域结束 -->

</div>
<div id="print"><iframe id="printframe"  name="printframe" src="about:blank" width="0"  height="0" scrolling="no" frameborder="0"></iframe></div>
<!-- 主页面结束 -->
</body></html>